package readwrite;


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class ReadWrite {

    public static void writeString(String s) {
        System.out.println(s);
    }

    public static void writeInt(int i) {
        System.out.println(i);
    }

    public static void writeDouble(double d) {
        System.out.println(d);
    }

    public static String readString(String message) {
        System.out.print(message);

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        try {
            return br.readLine();
        }
        catch (IOException ex) {
            ex.printStackTrace();
        }

        return null;
    }

    public static int readInt(String message) {
        System.out.print(message);

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        try {
            return Integer.parseInt(br.readLine());
        }
        catch (IOException ex) {
            ex.printStackTrace();
        }

        return 0;
    }

    public static double readDouble(String message) {
        System.out.print(message);

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        try {
            return Double.parseDouble(br.readLine());
        }
        catch (IOException ex) {
            ex.printStackTrace();
        }

        return 0.0;
    }

}
